import sys
import os
from django.urls import path
from rest_framework import routers
from api.views import account, huaweicloud_security,huaweicloud_cdn

router = routers.SimpleRouter()
# 注册
router.register(r'register', account.RegisterView, 'register')
# 华为云CDN api
router.register(r'cdn',huaweicloud_cdn.HuaWeiCloudCDNMiddleware, '')

urlpatterns = [
    # 登录
    path('auth/', account.AuthView.as_view()),
    # 华为安全组 api
    path('security/', huaweicloud_security.HuaWeiCloudSecurityMiddleware.as_view()),
    # 华为云CDN api
    # path('cdn/', huaweicloud_cdn.HuaWeiCloudCDNMiddleware.as_view())
]
urlpatterns += router.urls
